<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2008 XBRL International. All Rights Reserved. -->
<?xml-stylesheet type="text/xsl" href="../stylesheets/functionDefinition.xsl"?>
<function
  xmlns="http://xbrl.org/2008/function" 
  xmlns:reg="http://xbrl.org/2008/registry" 
  xmlns:xhtml="http://www.w3.org/1999/xhtml" 
  xmlns:xfi="http://www.xbrl.org/2008/function/instance" 
  xmlns:xfie="http://www.xbrl.org/2008/function/instance/error" 
  xmlns:xbrli="http://www.xbrl.org/2003/instance" 
  xmlns:xlink="http://www.w3.org/1999/xlink" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="
  http://xbrl.org/2008/registry ../schemas/registry.xsd
  http://xbrl.org/2008/function ../schemas/function.xsd
  ">

  <lastUpdated moment="2008-05-22T00:00:00" />

  <owners>
    <reg:owner id="geoff">
       <reg:name>Geoff Shuetrim</reg:name>
       <reg:affiliation>Galexy</reg:affiliation>
       <reg:email>geoff@galexy.net</reg:email>
       <reg:assumedOwnership moment="2008-02-05T00:00:00" />
    </reg:owner>
    <reg:owner id="herm">
       <reg:name>Herm Fischer</reg:name>
      <reg:affiliation>UBMatrix / Mark V Systems</reg:affiliation>
       <reg:email>fischer@markv.com</reg:email>
       <reg:assumedOwnership moment="2008-09-01T00:00:00" />
    </reg:owner>
  </owners>

  <summary>
    Returns the QName, if any, of the member reported for the dimension
    in either the segment or scenario of the supplied item.
  </summary>

  <documentation>
  </documentation>

  <signature name="xfi:fact-explicit-dimension-value">

    <input name="item" type="schema-element(xbrli:item)">
      <xhtml:p>
        The item that the dimension value is required for.
      </xhtml:p>
    </input>

    <input name="dimension" type="xs:QName">
      <xhtml:p>
        The QName of the dimension that the value is required for.
      </xhtml:p>
    </input>

    <output type="xs:QName?">
      <xhtml:p>
        Returns the QName of the value for the dimension that is reported in the segment or scenario of the item
        and the empty sequence if the dimension is not reported for the item
        and no default is applicable. 
      </xhtml:p>
      <xhtml:p>
        The dimension default is deemed applicable when the dimension is not reported for the item, regardless of
        the dimensional validity of this default value for the item (e.g., the default is reported even when the primary item
        concept, of an item lacking the dimension, is in a closed hypercube that does not allow the dimension or does not allow the default member).
      </xhtml:p>
    </output>
  </signature>

  <error code="xfie:invalidExplicitDimensionQName">
    <xhtml:p>
      This error MUST be thrown if the dimension does not specify an 
      explicit dimension in the reference discoverable taxonomy set.
    </xhtml:p>
  </error>

  <conformanceTest xlink:type="simple" xlink:href="90309 xfi.fact-explicit-dimension-value testcase.xml"/>

  <revisions>
    <reg:revision on="2008-02-05T10:54:00" by="geoff">
      <xhtml:p>
        Created the function definition.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-02-27T00:00:00" by="geoff">
      <xhtml:p>
        Made the function specific to segments.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-04-15T00:00:00" by="herm">
      <xhtml:p>
        Renamed invalidSegmentDimensionForFact to invalidDimensionForFact upon advice from Fujitsu for consistency.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-05-22T00:00:00" by="herm">
      <xhtml:p>
        Added note and testcase that default values are reportable.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-09-01T00:00:00" by="herm">
      <xhtml:p>
        Made the function segment/scenario agnostic, renamed without segment/scenario in name.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-11-13T00:00:00" by="geoff">
      <xhtml:p>
        Removed the xfie:invalidDimensionForFact error code because any such problems are expected to be detected
        by pre-processing validation of the instance containing the fact.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2011-03-01T16:00:00" by="herm">
      <xhtml:p>
        Clarified that dimension default values are reported for a dimension without respect to such a default value's
        validity for a given primary item.
      </xhtml:p>
    </reg:revision>
  </revisions>

</function>
